package com.wrk._1_语法._03_分支;

import java.util.Scanner;

public class _005_根据成绩判断等级2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入成绩:");
        //等待输入
        double score = scanner.nextDouble();
        //定义变量
        String grade = null;
        //判断
        if (score<=100) {
            if (score >= 90) {
                grade = "A";
            } else if (score <= 89 && score >= 80) {
                grade = "B";
            } else if (score <= 79 && score >= 70) {
                grade = "C";
            } else if (score <= 69 && score >= 60) {
                grade = "D";
            } else if (score <= 60) {
                grade = "E";
            }
        }
        System.out.println(grade);
        scanner.close();
    }
}